<template xmlns="http://www.w3.org/1999/html">
  <el-aside class="aside">
      <el-scrollbar height="100%">
        <el-card :body-style="{ padding: '0px' }">
              <div class="block">
              <p>图片1</p>
              <el-image style="width: 70px; height: 70px" :src="url" fit="contain" />
              </div>
              <div class="block">
              <p>图片2</p>
              <el-image style="width: 70px; height: 70px" :src="url" fit="contain" />
              </div>
          <div>
          <p class="Aside-p"><el-icon><goods /></el-icon>商品名称：{{Good.name}}</p>
          </div>
          <el-divider>
            <el-icon><star-filled /></el-icon>
          </el-divider>
          <div>
            <p class="Aside-p"><el-icon><money /></el-icon>商品价格：{{Good.money}}</p>
          </div>
          <el-divider>
            <el-icon><star-filled /></el-icon>
          </el-divider>
          <div>
            <p class="Aside-p"></p>
          </div>
          <div>
            <p class="Aside-p"><el-icon><info-filled /></el-icon>商品描述：{{Good.des}}</p>
          </div>
        </el-card>
      </el-scrollbar>
  </el-aside>
</template>

<script lang="ts">
//这里在使用相关的回调函数时需要先引入
import {defineComponent, reactive,ref} from 'vue';
import {ElAside} from "element-plus";
//每次注册的时候需要引入包
export default defineComponent({
  //这个是注册组件
  //入口函数
  name: 'aside',
  components: {ElAside},
  setup() {
    const url=ref('src/assets/img/甜菜幼苗升级.jpg')
    const Good=reactive({
      name:'测试名字',
      des:'测试介绍',
      money: 100
    })
    return {
      Good,
      url
    }
  }
});
</script>

<style scoped>
.aside{
  position: relative;
  top: 250px;
  height: 100%;
  width: 10%;
  overflow: hidden;
  bottom: 200px;
  color: var(--el-text-color-primary);
}

.Aside-p{
  position: relative;
  font-style: oblique;
  font-size: 15px;
  left: 20px;
}
 .block {
  padding: 30px 0;
  text-align: center;
  display: inline-block;
  width: 49%;
  box-sizing: border-box;
  vertical-align: top;
}
</style>
